Message processing method and apparatus

ABSTRACT

Embodiments of the present invention relate to the field of communications technologies, and provide a message processing method and apparatus, to resolve a prior-art problem that intelligence of a notification message processing method is relatively low. In the embodiments of the present invention, an importance level of each application is determined based on a historical use feature of each application, and then a notification manner of a notification message of each application is determined based on the importance level of each application, so that when a notification message is received, the notification message is displayed in the notification manner corresponding to the application to which the notification message belongs. Solutions provided in the embodiments of the present invention are suitable for use during notification message processing.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/463,557, filed on May 23, 2019, which is a National Stage ofInternational Application No. PCT/CN2017/074770, filed on Feb. 24, 2017,which claims priority to Chinese Patent Application No. 201611057261.2,filed on Nov. 26, 2016. All of the aforementioned patent applicationsare hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of communicationstechnologies, and in particular, to a message processing method andapparatus.

BACKGROUND

With development and popularization of smartphones, various applicationson smartphones provide much convenience to people's lives. Because thereare more applications installed on the smartphone, there are a growingnumber of various notification messages such as short message service(SMS) message notifications and push messages of various applications onthe smartphone. These notification messages include messages that a userreally needs, and also include some spam messages such as advertisementemails and spam SMS messages. It is very inconvenient for the user toread required messages when useful messages and the spam messages aremixed together.

Currently, to manage the notification messages in the smartphone, theuser may select to suppress notification messages of some applications,so that the messages of these applications are not displayed in anotification bar. Although a quantity of notification messages can bereduced by using the method, the user easily cannot see importantmessages in time, and useful messages and spam messages may still existin applications that are not suppressed. Therefore, the notificationmessage processing method in the prior art is insufficientlyintelligent.

SUMMARY

Embodiments of the present invention provide a message processing methodand apparatus, to resolve a prior-art problem that intelligence of anotification message processing method is relatively low.

To achieve the foregoing objective, the following technical solutionsare used in the embodiments of the present invention.

According to a first aspect, an embodiment of the present inventionprovides a message processing method, including determining animportance level of each application based on a historical use featureof each application on a terminal, and then determining a notificationmanner of a notification message of each application based on theimportance level of each application, so that when receiving anotification message, the terminal displays the notification message inthe notification manner corresponding to the application to which thenotification message belongs. It can be learned that in this embodimentof the present invention, not all the notification manners are displayedin a same manner, the importance level of each application may bedetermined based on a use habit of a user for each application, and thenotification message of the application of each importance levelcorresponds to one notification manner, so that notification messages ofapplications with different importance levels are displayed in differentnotification manners. Therefore, a requirement and a habit of the userfor viewing the message can be satisfied, thereby improving intelligencefor processing the notification message.

In a possible design, before displaying the notification message, theterminal further needs to determine a notification time period of eachapplication based on an online time and/or an application type of eachapplication. The online time of the application may reflect a time spentby the user in using the application, and the notification time periodof each application is determined with reference to the online time andthe application type, so that the notification time period of theapplication satisfies the use habit of the user. In addition, theapplication type is considered when the notification time period isdetermined. For example, a notification time period of a work-typeapplication is a working time, and a notification time period of anentertainment application is a non-working time. Therefore, processingon the notification message is more intelligent.

In a possible design, a specific method for notifying the notificationmessage in the terminal is when receiving a notification message,determining whether a current moment is in the notification time periodof the application to which the notification message belongs, and ifcurrent moment is in the notification time period of the application towhich the notification message belongs, displaying the notificationmessage in the notification manner corresponding to the application towhich the notification message belongs, or if current moment is not inthe notification time period of the application to which thenotification message belongs, temporarily storing the notificationmessage, and displaying, when the current moment reaches thenotification time period of the application to which the notificationmessage belongs, the notification message in the notification mannercorresponding to the application to which the notification messagebelongs. The notification message is processed in an appropriate timesegment, so that the user is prevented from being interfered by someinopportune notification messages, thereby improving the intelligencefor processing the notification message.

In a possible design, the historical use feature includes at least oneof use duration, a quantity of times of starting, and a quantity ofapplication download times, and a method for determining the importancelevel of each application by the terminal is sorting use duration of theapplications, and dividing the applications into N first type sets indescending order of the use duration, where N is a positive integergreater than 1, and serial numbers of the N first type sets are 1 to N,sorting quantities of times of starting the applications, and dividingthe applications into N second type sets in descending order of thequantities of times of starting, where serial numbers of the N secondtype sets are 1 to N, sorting quantities of application download timesof the applications, and dividing the applications into N third typesets in descending order of the quantities of application downloadtimes, where serial numbers of the N third type sets are 1 to N, andthen sequentially sifting out an identical application from the firsttype set, the second type set, and the third type set that correspond toeach serial number, to form an importance level set corresponding toeach serial number, where a smaller serial number of the importancelevel set indicates a higher importance level of the application in theimportance level set. It can be learned that the importance level of theapplication is determined based on the use duration of the application,so that it can be ensured that the notification message of theapplication frequently used by the user is notified in time. Therefore,a notification occasion of the notification message more satisfies theuse habit of the user.

In a possible design, in a process in which the terminal sequentiallysifts out the identical application from the first type set, the secondtype set, and the third type set that correspond to each serial number,to form the importance level set corresponding to each serial number,each time an identical application is sifted out from the first typeset, the second type set, and the third type set that correspond to oneserial number, the identical application in the first type set, thesecond type set, and the third type set that correspond to the currentserial number needs to be used as the importance level set correspondingto the current serial number, and then applications that are not siftedout from the first type set, the second type set, and the third type setthat correspond to the current serial number are respectively added tothe first type set, the second type set, and the third type set thatcorrespond to a next serial number.

In a possible design, after the terminal determines the importance levelof each application based on the use duration, the quantity of times ofstarting, and the quantity of download times of each application on theterminal, the terminal may further receive a change instruction enteredby the user, where the change instruction carries an importance level ofthe application, and changes, based on the change instruction, theimportance level of the application that corresponds to the changeinstruction to the importance level carried in the change instruction.It can be learned that the terminal may automatically determine theimportance level of the application based on historical data, and theuser may also change the importance level of the application based on areal-time requirement of the user, so that the notification occasion ofthe notification message more satisfies the requirement of the user,thereby further improving the intelligence for processing thenotification message.

According to another aspect, an embodiment of the present inventionprovides a message processing apparatus. The apparatus may implement afunction performed by the terminal in the foregoing example of themethod, and the function may be implemented by using hardware or may beimplemented by hardware executing corresponding software. The hardwareor software includes one or more modules corresponding to the foregoingfunction.

In a possible design, a structure of the apparatus includes a processorand a display unit. The processor is configured to enable the apparatusto perform a corresponding function in the foregoing method. The displayis configured to enable the apparatus to display the notificationmessage. The apparatus may further include a memory. The memory isconfigured to couple to the processor and store a necessary programinstruction and necessary data of the apparatus.

According to still another aspect, an embodiment of the presentinvention provides a communications system. The system includes theterminal according to the foregoing aspects and a cloud server.

According to yet another aspect, an embodiment of the present inventionprovides a computer storage medium, configured to store a computersoftware instruction used by the foregoing terminal. The computersoftware instruction includes a program designed for performing theforegoing aspects.

Compared with the prior art, in the embodiments of the presentinvention, not all the notification manners are displayed in a samemanner, the importance level of each application may be determined basedon a use habit of a user for each application, and the notificationmessage of the application of each importance level corresponds to onenotification manner, so that notification messages of applications withdifferent importance levels are displayed in different notificationmanners. Therefore, a requirement and a habit of the user for viewingthe message can be satisfied, thereby improving intelligence forprocessing the notification message.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention or in the prior art more clearly, the following brieflydescribes the accompanying drawings required for describing theembodiments or the prior art. Apparently, the accompanying drawings inthe following description show merely some embodiments of the presentinvention, and a person of ordinary skill in the art may derive otherdrawings from these accompanying drawings without creative efforts.

FIG. 1 is a flowchart of a message processing method according to anembodiment of the present invention;

FIG. 1a is an example of a schematic diagram of a message processingmethod according to an embodiment of the present invention;

FIG. 1b is an example of a schematic diagram of another messageprocessing method according to an embodiment of the present invention;

FIG. 1c is an example of a schematic diagram of another messageprocessing method according to an embodiment of the present invention;

FIG. 2 is a flowchart of another message processing method according toan embodiment of the present invention;

FIG. 3 is a flowchart of another message processing method according toan embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a message processingapparatus according to an embodiment of the present invention; and

FIG. 5 is a schematic structural diagram of a terminal according to anembodiment of the present invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

Network architectures and service scenarios described in the embodimentsof the present invention aim to more clearly describe the technicalsolutions in the embodiments of the present invention, but are notintended to limit the technical solutions provided in the embodiments ofthe present invention. A person of ordinary skill in the art may knowthat as the network architectures evolve and a new service scenarioemerges, the technical solutions provided in the embodiments of thepresent invention are further applicable to a similar technical problem.

It should be noted that in the embodiments of the present invention, theword “example” or “for example” is used to represent giving an example,an illustration, or a description. Any embodiment or design schemedescribed as an “example” or “for example” in the embodiments of thepresent invention should not be explained as being more preferred orhaving more advantages than another embodiment or design scheme.Exactly, use of the word “example” or “for example” or the like isintended to present a related concept in a specific manner.

It should be noted that in the embodiments of the present invention,“of”, “relevant” and “corresponding” may be mixed during use sometimes.It should be noted that when a difference thereof is de-emphasized,meanings expressed by them are the same.

A terminal, also referred to as user equipment (UE), is a deviceproviding voice and/or data connectivity to a user, for example, ahandheld device or an in-vehicle device having a wireless connectionfunction. A common terminal may, for example, include a mobile phone, atablet computer, a notebook computer, a palmtop computer, a mobileInternet device (MID), a wearable device such as a smartwatch, a smarthelmet, a smart band, or a pedometer.

To improve intelligence for processing a notification message, anembodiment of the present invention provides a message processingmethod. The method is performed by a terminal. As shown in FIG. 1, themethod includes the following steps.

101. Determine an importance level of each application based on ahistorical use feature of each application on a terminal.

The historical use feature includes at least one of use duration, aquantity of times of starting, and a quantity of application downloadtimes of the application. The use duration of the application isaccumulated use duration of the application on a foreground excluding arunning time of the application on a background. The quantity ofapplication download times is obtained by the terminal from a cloudserver. The cloud server may collect statistics on a total quantity ofdownload times of each application, to determine the quantity ofapplication download times.

It should be noted that the use duration of each application and thequantity of times of starting may reflect a use habit of a user for theapplication. For example, if the user frequently starts an application,it indicates that the user often needs to use the application, so thatthe importance level of the application is relatively high. When anotification message of the application is received, the notificationmessage needs to be notified in time, so that the user may see thenotification message of the application in time. That is, a longer useduration, a larger quantity of times of starting, and a larger quantityof application download times of an application indicate a higherimportance level of the application.

It should be further noted that the terminal periodically collectsstatistics on the use duration, the quantity of times of starting, andthe quantity of application download times of each application, andupdates the importance level of the application.

102. Determine a notification manner of a notification message of eachapplication based on the importance level of each application.

For example, there may be three importance levels, and the threeimportance levels are respectively important, unimportant, and veryunimportant.

The notification message of the application whose importance level isimportant may be prompted by using a pop-up window, and a displaylocation of the notification message of the application whose importancelevel is important is before that of the notification message of theapplication whose importance level is unimportant.

If the terminal is in a screen-locked state, the notification message ofthe application whose importance level is important may be displayed ona lock screen interface by using a pop-up window.

In addition, the notification message of the application whoseimportance level is important may be set to be prompted at an intervalbefore the user processes the message.

The notification message of the application whose importance level isunimportant may be displayed in a notification bar instead of beingprompted by using a pop-up window.

The notification message of the application whose importance level isvery unimportant may be a spam SMS message or a spam advertisement, sothat the notification message may not be notified.

103. Display, when receiving a notification message, the notificationmessage in the notification manner corresponding to the application towhich the notification message belongs.

In an example, it is determined by using step 101 that for a terminal A,an importance level of WeChat is important, an importance level of amicroblog is unimportant, and an importance level of QQ is veryunimportant.

In this case, when a notification message of WeChat is received, thenotification message is displayed by using a pop-up window, as shown inFIG. 1 a.

When a notification message of the microblog is received, thenotification message is displayed in a notification bar, and if thenotification message of WeChat is not processed at this time, thenotification message of the microblog is located below the notificationmessage of WeChat in the notification bar, as shown in FIG. 1 b.

When a notification message of QQ is received, the terminal does notprompt a terminal message of QQ. A user may see the notification messageof QQ only when opening the QQ user interface.

It should be noted that if an application has various types ofnotification messages, a notification policy of each type of thenotification message may be preset. For example, an update message ofthe application may be set to be prompted when the application isstarted, and a social message of the application is prompted in thenotification manner determined in step 102.

Specifically, using WeChat as an example, an update message of WeChatmay be set to be prompted by using a pop-up window when WeChat isstarted, as shown in FIG. 1c . A chat message of WeChat is prompted inthe notification manner determined in step 102. If the notificationmanner of WeChat is important, the chat message of WeChat is prompted byusing a pop-up window and is displayed at the top of the notificationbar. If the notification manner of WeChat is unimportant, the chatmessage of WeChat is displayed in the notification bar instead of beingprompted by using a pop-up window. When a message of an official accountof WeChat is received, the message of the official account is notprompted by using a pop-up window and is not displayed in thenotification bar of the terminal. When the user starts WeChat, theunread message of the official account is identified by using a symbol.For example, if a little red point is displayed at the upper rightcorner of a profile image of the official account, it indicates thatthere is an unread message in the official account.

In the message notification method provided in this embodiment of thepresent invention, the terminal may determine the importance level ofeach application based on the historical use feature of eachapplication, and then determine the notification manner of thenotification message of each application based on the importance levelof each application, so that when a notification message is received,the notification message is displayed in the notification mannercorresponding to the application to which the notification messagebelongs. Compared with the prior art, not all the notification mannersare displayed in a same manner, the importance level of each applicationmay be determined based on the use habit of the user for eachapplication, and the notification message of the application of eachimportance level corresponds to one notification manner, so thatnotification messages of applications with different importance levelsare displayed in different notification manners. Therefore, arequirement and a habit of the user for viewing the message can besatisfied, thereby improving intelligence for processing thenotification message.

A method for determining the importance level of each application basedon the use duration, the quantity of times of starting, and the quantityof application download times of each application on the terminal instep 101 is described below.

Use duration of the applications are sorted, the applications aredivided into N first type sets in descending order of the use duration,N is a positive integer greater than 1, and serial numbers of the Nfirst type sets are 1 to N. For example, it is assumed that there arenine applications, and the nine applications are an application 1 to anapplication 9, a first type set 1 is {the application 1, the application2, and the application 3}, a first type set 2 is {the application 4, theapplication 5, and the application 6}, and a first type set 3 is {theapplication 7, the application 8, and the application 9}.

Quantities of times of starting the applications are sorted, theapplications are divided into N second type sets in descending order ofthe quantities of times of starting, and serial numbers of the N secondtype sets are 1 to N. For example, a second type set 1 is {theapplication 1, the application 2, and the application 4}, a second typeset 2 is {the application 3, the application 5, and the application 6},and a second type set 3 is {the application 7, the application 8, andthe application 9}.

Quantities of application download times of the applications are sorted,the applications are divided into N third type sets in descending orderof the quantities of application download times, and serial numbers ofthe N third type sets are 1 to N. For example, a third type set 1 is{the application 1, the application 3, and the application 5}, a thirdtype set 2 is {the application 2, the application 4, and the application6}, and a third type set 3 is {the application 7, the application 8, andthe application 9}.

In the foregoing processing process, the applications are respectivelyadded into the N first type sets, the N second type sets, and the Nthird type sets in different manners, and then an identical applicationis sequentially sifted out from the first type set, the second type set,and the third type set that correspond to each serial number, to form animportance level set corresponding to each serial number. A smallerserial number of the importance level set indicates a higher importancelevel of the application in the importance level set.

Each time an identical application is sifted out from the first typeset, the second type set, and the third type set that correspond to oneserial number, the identical application in the first type set, thesecond type set, and the third type set that correspond to the currentserial number is used as the importance level set corresponding to thecurrent serial number, and applications that are not sifted out from thefirst type set, the second type set, and the third type set thatcorrespond to the current serial number are respectively added to thefirst type set, the second type set, and the third type set thatcorrespond to a next serial number.

With reference to the foregoing example, an identical application in thefirst type set {the application 1, the application 2, and theapplication 3}, the second type set {the application 1, the application2, and the application 4}, and the third type set {the application 1,the application 3, and the application 5} that correspond to the serialnumber 1 is the application 1. Therefore, a first importance level setis {the application 1}.

After the first level set is determined, the first type set with theserial number 2 is updated to {the application 2, the application 3, theapplication 4, the application 5, and the application 6}, the secondtype set with the serial number 2 is updated to {the application 2, theapplication 3, the application 4, the application 5, and the application6}, and the third type set with the serial number 2 is updated to {theapplication 2, the application 3, the application 4, the application 5,and the application 6}, so that a second importance level set formed byidentical applications sifted out from the first type set, the secondtype set, and the third type set is {the application 2, the application3, the application 4, the application 5, and the application 6}.

Then, identical applications in the first type set {the application 7,the application 8, and the application 9}, the second type set {theapplication 7, the application 8, and the application 9}, and the thirdtype set {the application 7, the application 8, and the application 9}that are with the serial number 3 are the application 7, the application8, and the application 9. Therefore, a third importance level set is{the application 7, the application 8, and the application 9}.

In another example, the applications are sorted based on use duration ofthe applications, to obtain four first type sets. The four first typesets are respectively a time 1, a time 2, a time 3, and a time 4. Thetop 20% of the applications whose use duration ranked top form the time1, the following 30% of the applications form the time 2, the following30% of the applications form the time 3, and the bottom 20% of theapplications form the time 4. The applications are sorted based on thequantities of times of starting, and still based on intervals of 20%,30%, 30%, and 20% ranked from top to bottom, four second type sets,namely, a count 1, a count 2, a count 3, and a count 4, are sequentiallyobtained. The applications are sorted based on the quantities ofapplication download times, and still based on the intervals of 20%,30%, 30%, and 20% ranked from top to bottom, four third type sets,namely, a number 1, a number 2, a number 3, and a number 4, aresequentially obtained. First, an identical application is sifted outfrom the time 1, the count 1, and the number 1, to form a firstimportance level set, and then the unselected application in the time 1is added to the time 2, the unselected application in the count 1 isadded to the count 2, and the unselected application in the number 1 isadded to the number 2. A second importance level set, a third importancelevel set, and a fourth importance level set may be sequentiallydetermined based on the method. Importance levels of the applications inthe first importance level set, the second importance level set, thethird importance level set, and the fourth importance level set decreasesequentially.

Alternatively, identical applications may be sequentially sifted outfirst from the time 1, the time 2, the time 3, and the time 4 and thecount 1, the count 2, the count 3, and the count 4 based on theforegoing method, to obtain four sets, and then the four obtained setsare respectively compared with the number 1, the number 2, the number 3,and the number 4. Finally, the first importance level set, the secondimportance level set, the third importance level set, and the fourthimportance level set are obtained.

Further, after the importance level set is determined, the importancelevel set is further stored corresponding to the notification manner ofthe notification message. In this way, after a notification message ofthe application is received, the notification manner of the notificationmessage may be determined based on the importance level of theapplication.

For example, a correspondence between the importance level set and thenotification manner of the notification message is shown in Table 1:

TABLE 1 First importance level set (for The notification message isexample, WeChat is included) displayed by using a pop-up window and isprompted through vibration Second importance level set (for Thenotification message is example, the microblog is included) displayed inthe notification bar and is prompted through vibration Third importancelevel set (for The notification message is example, QQ is included)displayed in the notification bar without being prompted throughvibration Fourth importance level set The notification message is notprompted

It should be noted that the correspondence between the importance levelset and the notification manner of the notification message in theforegoing table is merely an example, and a quantity of importancelevels and the notification manner corresponding to the application ineach importance level may be set based on an actual requirement.

Still with reference to the foregoing table, when receiving a message ofWeChat, the terminal may determine that WeChat belongs to the firstimportance level set, and further determine that the notification mannercorresponding to the first importance level set is displaying thenotification message by using a pop-up window and prompting thenotification message through vibration. Therefore, the terminal displaysthe message of WeChat in a pop-up window and prompts the message throughvibration.

When receiving a message of the microblog, the terminal may determinethat the microblog belongs to the second importance level set, andfurther determine that the notification manner corresponding to thesecond importance level set is displaying the notification message inthe notification bar and prompts the notification message throughvibration. Therefore, the terminal displays the message of the microblogin the notification bar and prompts the message through vibration.

With reference to the method procedure shown in FIG. 1, to moreintelligently process the notification message, not only thenotification manner of the notification message of each applicationneeds to be determined, but also a notification time period needs to bedetermined. Based on this, in another implementation according to anembodiment of the present invention, as shown in FIG. 2, the methodfurther includes the following steps.

201. Determine a notification time period of each application based onan online time and/or an application type of each application.

The terminal may determine the notification time period of eachapplication based on the online time of each application, or determinethe notification time period of each application based on theapplication type of each application, or determine the notification timeperiod of each application based on the online time and the applicationtype of each application.

The terminal may determine the application type of each application byitself, or may obtain the application type of each application from thecloud server.

Specifically, one day 24 hours may be divided into a plurality of timesegments. For example, one day is divided into a sleep time segment, adining time segment, a working time segment, a leisure time segment, andthe like. Each application type corresponds to a use time segment. Forexample, a work-type application is usually used in a working time, andan entertainment type application is usually used in a non-working time.

It is determined based on the online time of each application that theuser usually uses each application in which time segment, and it isdetermined with reference to the application type that the notificationtime period of each application is the sleep time segment, the diningtime segment, or the working time segment. If the online time of theapplication belongs to two time segments, it is determined that theonline time of the application in which time segment is longer, and thetime segment in which the online time is longer is determined as thenotification time period.

For example, if the online time of the application is from 9:30 to10:30, it may be determined that the online time of the application isin the working time segment, and the application type of the applicationis the work-type application, so that it may be finally determined thatthe notification time period of the application is the working timesegment.

It may be understood that based on that the notification time period ofeach application is determined, when the notification message isreceived, a moment for displaying the notification message further needsto be determined. Therefore, the displaying, when receiving anotification message, the notification message in the notificationmanner corresponding to the application to which the notificationmessage belongs in step 103 may be specifically implemented as step 202to step 204.

202. When receiving a notification message, determine whether a currentmoment is in the notification time period of the application to whichthe notification message belongs. If current moment is in thenotification time period of the application to which the notificationmessage belongs, perform step 204, or if current moment is not in thenotification time period of the application to which the notificationmessage belongs, perform step 205.

For example, if the current moment is the working time segment and thenotification time period of the application to which the receivednotification message belongs is also the working time segment, step 203may be performed, and the notification is immediately displayed in thenotification manner of the application to which the notification messagebelongs.

If the current moment is the working time segment and the notificationtime period of the application to which the received notificationmessage belongs is the leisure time segment, step 204 is performed, andthe notification is displayed in the notification manner of theapplication to which the notification message belongs in the leisuretime segment.

203. Display the notification message in the notification mannercorresponding to the application to which the notification messagebelongs.

204. Buffer the notification message, and display, when the currentmoment reaches the notification time period of the application to whichthe notification message belongs, the notification message in thenotification manner corresponding to the application to which thenotification message belongs.

In the embodiments of the present invention, not only the notificationmanner corresponding to the notification message of each applicationneeds to be determined, but also the notification time period of eachapplication needs to be determined, so that the notification message maybe notified at an appropriate time. Therefore, the user may see animportant notification message in time, and do not miss any commonnotification message, in addition, a useless notification message isprevented from affecting rest or working of the user, thereby furtherimproving the intelligence for processing the notification message.

It should be noted that the importance level determined by the terminalbased on the use duration and the quantity of download times of theapplication may not always satisfy a subsequent requirement of the user.For example, the user may use an application that is seldom used becauseof an important working requirement. To make the notification manner ofthe notification message and the notification time more satisfy therequirement of the user, the user may also manually adjust theimportance level of the application. Based on this, in anotherimplementation according to an embodiment of the present invention, asshown in FIG. 3, after the determining an importance level of eachapplication based on a historical use feature of each application on aterminal in step 101, the method further includes the following steps.

301. Receive a change instruction entered by a user.

The change instruction of the user may carry an importance level of theapplication, that is, the user may enter the level of the application inan input box. Alternatively, a setting screen of the terminal maydisplay an importance level option of each application, and the changeinstruction entered by the user is a click operation on the importancelevel option of the application.

302. Change, based on the change instruction, the importance level ofthe application that corresponds to the change instruction to animportance level specified in the change instruction.

It may be understood that the importance level specified in the changeinstruction is the importance level entered by the user or theimportance level selected by the user in step 301.

It should be noted that after changing the importance level of theapplication based on the change instruction entered by the user, theterminal further needs to perform step 102 again, to determine anotification manner of the notification message of each applicationagain.

In addition, the terminal may further receive a notification time periodchange instruction entered by the user, and change the notification timeperiod of the application based on the notification time period changeinstruction, so that the user may set the notification time of theapplication based on a living habit of the user.

In the message processing method provided in the embodiments of thepresent invention, the terminal may determine the importance level ofeach application based on the use duration, the quantity of times ofstarting, and the quantity of application download times of eachapplication, to determine the notification manner of each application,and determine the notification time period of the notification messageof each application based on the online time and the application type ofeach application. Alternatively, the user may set the importance levelof the application and the notification time period. Therefore, thenotification manner and the notification time of the notificationmessage more satisfy the requirement of the user, thereby improving theintelligence for processing the message.

In the foregoing descriptions, the solutions provided in the embodimentsof the present invention are described mainly from a perspective of theterminal. It may be understood that the terminal includes correspondinghardware structures and/or software modules for performing thefunctions. A person skilled in the art should easily be aware that, incombination with examples of units and algorithm steps described in theembodiments disclosed in this specification, the present invention maybe implemented in a hardware form or a form of a combination of hardwareand computer software. Whether a function is performed by using hardwareor by driving the hardware by the computer software depends onparticular applications and design constraints of the technicalsolutions. A person skilled in the art may use different methods toimplement the described functions for each particular application, butit should not be considered that the implementation goes beyond thescope of the present invention.

In the embodiments of the present invention, functional modules of theterminal may be divided based on the foregoing method examples. Forexample, functional modules may be divided corresponding to thefunctions, or two or more functions may be integrated into oneprocessing module. The integrated module may be implemented in a form ofhardware, or may be implemented in a form of a software functionalmodule. It should be noted that the module division in the embodimentsof the present invention is an example, and is merely logical functiondivision. There may be another division manner in an actualimplementation.

When the functional modules are divided corresponding to the functionsagain, an embodiment of the present invention further provides a messageprocessing apparatus. The apparatus may be the terminal in the foregoingembodiments. As shown in FIG. 4, FIG. 4 shows the apparatus in theforegoing embodiments. For example, FIG. 4 is a possible schematicstructural diagram of the terminal. The apparatus includes a determiningmodule 401, a notification module 402, a receiving module 403, and achange module 404. The determining module 401 is configured to enablethe terminal to perform step 101 and step 102 in FIG. 1 and step 201 andstep 202 in FIG. 2. The notification module 402 is configured to enablethe terminal to perform step 103 in FIG. 1 and step 203 and step 204 inFIG. 2. The receiving module 403 is configured to enable the terminal toperform step 301 in FIG. 3. The change module 404 is configured toenable the terminal to perform step 302 in FIG. 3. For the functionaldescriptions of the corresponding functional modules, refer to allrelated content of the steps in the foregoing method embodiments, anddetails are not described herein again.

When an integrated unit is used, FIG. 5 is another possible schematicstructural diagram of the terminal in the foregoing embodiments of thepresent invention. As shown in FIG. 5, the terminal includes a processor502, a display unit 503, a memory 501, and a bus 504. The display unit503, the processor 502, and the memory 501 are connected to each otherby using the bus 504. The bus 504 may be a peripheral componentinterconnect (PCI) bus, an extended industry standard architecture(EISA) bus, or the like. The bus may be classified into an address bus,a data bus, a control bus, or the like. For ease of representation, thebus in FIG. 5 is represented by using only one bold line, but this doesnot indicate that there is only one bus or only one type of bus.

The memory 501 is configured to store program code and data of theterminal. The display unit 503 is configured to display the notificationmessage under control of the processor 502. The processor 502 isconfigured to control and manage an operation of the terminal. Forexample, the processor 502 is configured to enable the terminal toperform step 101 to step 103 in FIG. 1, step 101 and step 202 in FIG. 2,and step 302 in FIG. 3, and/or another process of the technologydescribed in this specification.

Method or algorithm steps described in combination with the contentdisclosed in the present invention may be implemented by using hardware,or may be implemented by a processor by executing a softwareinstruction. The software instruction may include a correspondingsoftware module. The software module may be stored in a random accessmemory (RAM), a flash memory, a read-only memory (ROM), an erasableprogrammable read only memory (EPROM), an electrically erasableprogrammable read only memory (EEPROM), a register, a hard disk, amobile hard disk, a compact disc read-only memory (CD-ROM), or a storagemedium of any other form well-known in the art. For example, a storagemedium is coupled to a processor, so that the processor can readinformation from the storage medium or write information into thestorage medium. Certainly, the storage medium may alternatively be acomponent of the processor. The processor and the storage medium may belocated in an application specific integrated circuit (ASIC). Inaddition, the ASIC may be located in a core network interface device.Certainly, the processor and the storage medium may exist in the corenetwork interface device as discrete components.

Based on the foregoing descriptions of the implementations, a personskilled in the art may clearly understand that the present invention maybe implemented by using software in addition to necessary universalhardware or by using hardware only. In most circumstances, the former isa preferred implementation. Based on such an understanding, thetechnical solutions of the present invention essentially or the partcontributing to the prior art may be implemented in a form of a softwareproduct. The software product is stored in a readable storage medium,such as a floppy disk, a hard disk, or an optical disc of a computer,and includes several instructions for instructing a computer device(which may be a personal computer, a server, or a network device) toperform the methods described in the embodiments of the presentinvention.

The foregoing descriptions are merely specific implementations of thepresent invention, but are not intended to limit the protection scope ofthe present invention. Any variation or replacement within the technicalscope disclosed in the present invention shall fall within theprotection scope of the present invention. Therefore, the protectionscope of the present invention shall be subject to the protection scopeof the claims.

What is claimed is:
 1. An electronic device, comprising: a processor;and a non-transitory computer-readable storage medium storing a programto be executed by the processor, the program including instructions to:determine an importance level of each application based on a historicaluse feature of each application on the electronic device, wherein theimportance level includes a first level and a second level; determine anotification manner of a notification message of each application basedon the importance level of each application; and receive a firstnotification message of a first application, and display the firstnotification message in a first notification manner of the firstnotification message, wherein the first notification messagecorresponding to the first level is displayed in a notification bar; andreceive a second notification message of a second application, anddisplay the second notification message in a second notification mannerof the second notification message, wherein the second notificationmessage corresponds to the second level, an importance of the secondlevel is less than an importance of the first level, and the secondnotification message corresponding to the second level is not displayedin the notification bar.
 2. The electronic device of claim 1, whereinthe instructions further include instructions to display the firstnotification message on a lock screen interface of the electronic devicebased on a screen-locked state of the electronic device.
 3. Theelectronic device of claim 1, the historical use feature of eachapplication comprises use habit of a user for each application.
 4. Theelectronic device of claim 3, wherein the historical use featureincludes at least one of a use duration, a quantity of times ofstarting, and a quantity of application download times, and wherein theinstructions to determine the importance level of each applicationincludes instructions to: sort, using at least one historical usefeature, a plurality of applications; and divide the plurality ofapplications into N first type sets in descending order of the at leastone historical use feature, where N is a positive integer greater than1, and serial numbers of the N first type sets are 1 to N.
 5. A messageprocessing method, comprising: determining a first level of a firstapplication based on a first historical use feature of the firstapplication on an electronic device; determining a first notificationmanner of a first notification message of the first application based onthe first level of the first application; receiving the firstnotification message of the first application, and displaying the firstnotification message in the first notification manner; determining asecond level of a second application based on a second historical usefeature of the second application on a terminal; determining a secondnotification manner of a second notification message of the secondapplication based on the second level of the second application; andreceiving the second notification message of the second application, anddisplaying the second notification message in the second notificationmanner; wherein the first level is different from the second level, andthe first notification manner is different from the second notificationmanner.
 6. The message processing method of claim 5, wherein the firstlevel and the second level are levels of importance, and wherein thesecond level is of lower importance than the first level.
 7. The messageprocessing method of claim 6, wherein the first notification message isdisplayed in front of the second notification manner.
 8. The messageprocessing method of claim 5, wherein displaying the first notificationmessage in the first notification manner comprises displaying the firstnotification message in a notification bar.
 9. The message processingmethod of claim 8, wherein displaying the second notification message inthe second notification manner comprises not displaying the secondnotification message in the notification bar.
 10. The message processingmethod of claim 5, wherein the first notification message correspondingto the first level is displayed on a lock screen interface of theelectronic device based on a screen-locked state of the electronicdevice.
 11. The message processing method of claim 5, the firsthistorical use feature of the first application comprises use habit of auser for the first application.
 12. The message processing method ofclaim 11, wherein the first historical use feature and the secondhistorical use feature each include at least one of a use duration, aquantity of times of starting, and a quantity of application downloadtimes, and wherein determining the first level of the first applicationbased on the first historical use feature and determining the secondlevel of the second application based on the second historical usefeature includes instructions for: sorting, using at least onehistorical use feature, a plurality of applications; and dividing theplurality of applications into N first type sets in descending order ofthe at least one historical use feature, where N is a positive integergreater than 1, and serial numbers of the N first type sets are 1 to N.13. An electronic device, comprising: a processor; and a non-transitorycomputer-readable storage medium storing a program to be executed by theprocessor, the program including instructions to: determine a firstlevel of a first application based on a first historical use feature ofthe first application on the electronic device; determine a firstnotification manner of a first notification message of the firstapplication based on the first level of the first application; andreceive the first notification message of the first application anddisplay the first notification message in the first notification manner;determine a second level of a second application based on a secondhistorical use feature of the second application on a terminal;determine a second notification manner of a second notification messageof the second application based on the second level of the secondapplication; and receive the second notification message of the secondapplication and display the second notification message in the secondnotification manner; wherein the first level is different from thesecond level, and the first notification manner is different from thesecond notification manner.
 14. The electronic device of claim 13,wherein the first level and the second level are levels of importance,and wherein the second level is of lower importance than the firstlevel.
 15. The electronic device of claim 14, wherein the instructionsfurther include instructions to display the first notification messagein front of the second notification message.
 16. The electronic deviceof claim 14, wherein the first historical use feature and the secondhistorical use feature each include at least one of a use duration, aquantity of times of starting, and a quantity of application downloadtimes, and wherein the instruction to determine the first level of thefirst application based on the first historical use feature anddetermine the second level of the second application based on the secondhistorical use feature includes instructions to: sort, using at leastone historical use feature, a plurality of applications; and divide theplurality of applications into N first type sets in descending order ofthe at least one historical use feature, where N is a positive integergreater than 1, and serial numbers of the N first type sets are 1 to N.17. The electronic device of claim 13, wherein the instructions furtherinclude instructions to display the first notification message in anotification bar.
 18. The electronic device of claim 17, wherein theinstructions further include instructions to not display the secondnotification message in the notification bar.
 19. The electronic deviceof claim 13, wherein the instructions further include instructions todisplay the first notification message on a lock screen interface of theelectronic device based on a screen-locked state of the electronicdevice.
 20. The electronic device of claim 13, the first historical usefeature of the first application comprises use habit of a user for thefirst application.